GCC = g++
CPPFLAGS = -g -finline-functions -Wall -Winline -pipe -DOS_LINUX
HEAD_INFO = -DPROJECT_NAME="\"FASTSEARCH\"" -DDESCRIPTION="\"FastSearch indexer\""
	  
INCLUDES = -I./ -I../../common/commonlib/output/include \
	   -I../../common/sparsehash/include \
	   -I../descriptorManager \
	   -I../termindex/ \
	   -I../../common/sign/

LIBS     = -L./ -L../../common/commonlib/output/lib -lcommonlib \
	   -L../../common/sign/ -lsign \
	   -L../descriptorManager -ldescriptorManager \
	   -lpthread

OUTPUTLIB = libunitReader.a

all : output unitReaderChecker

output : $(OUTPUTLIB)

unitReaderChecker : unitReaderChecker.o unitReader.o
	$(GCC) -o $@ $^ $(INCLUDES) $(HEAD_INFO) $(LIBS)

$(OUTPUTLIB) : unitReader.o
	$(AR) -rcv $@ $^

%.o     : %.cpp
	$(GCC) $(CPPFLAGS) -c $< -o $@ $(INCLUDES)


clean :
	rm -f *.a *.o unitReader unitReaderChecker

